package com.yourwork.dao.imp;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.yourwork.common.jpa.RechargeRepositoey;
import com.yourwork.dao.RechargeDao;
import com.yourwork.model.Recharge;
@Repository(value="payListDao")
public class RechargeDaoImp implements RechargeDao {
	@Autowired
	RechargeRepositoey payListRepositoey;
	public Page<Recharge> queryPayList(Pageable pageable) {
		// TODO Auto-generated method stub
		Page<Recharge> pagePayList = payListRepositoey.findAll(pageable);
		return pagePayList;
	}
	//添加
	public void insertPayList(Recharge paylist) {
		// TODO Auto-generated method stub
		payListRepositoey.saveAndFlush(paylist);
	}
	//统计总条数
	public int PayList() {
		// TODO Auto-generated method stub
		return (int)payListRepositoey.count();
	}

}
